-- GENERATED SPELL FOR [Foulmane] --


function spell0_1847(pUnit, Event) --@Infected Wound,n/a--
pUnit:FullCastSpellOnTarget(3427,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1847', 30251, 1)
end

function spell1_1847(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13445,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1847', 15000, 1)
end

function spell2_1847(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_1847', 659, 1)
end

function Sorts_1847(pUnit, Event)
local choix_sorts_1847 = math.random(0, 2)
if choix_sorts_1847 == 0 then
pUnit:RegisterEvent('spell0_1847', 1, 1)
end
if choix_sorts_1847 == 1 then
pUnit:RegisterEvent('spell1_1847', 1, 1)
end
if choix_sorts_1847 == 2 then
pUnit:RegisterEvent('spell2_1847', 1, 1)
end
end

function mob1847_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1847', math.random(1500, 3000), 1)
end

function mob1847_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1847_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1847_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1847, 1, 'mob1847_Action')
RegisterUnitEvent(1847, 2, 'mob1847_Leave')
RegisterUnitEvent(1847, 3, 'mob1847_Kill')
RegisterUnitEvent(1847, 4, 'mob1847_Die')
